package com.haiyou.qrcode.config;

import com.haiyou.qrcode.poster.config.PosterConfig;
import com.haiyou.qrcode.service.PosterService;
import com.haiyou.qrcode.poster.kernal.ResourceUtils;
import com.haiyou.qrcode.service.impl.PosterServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 海报自动配置
 */
@Configuration
public class PosterAutoConfiguration {

    @Bean
    public PosterConfig posterConfig() {
        return new PosterConfig();
    }

    @Bean
    public ResourceUtils resourceUtils() {
        return new ResourceUtils(posterConfig());
    }

    @Bean
    public PosterService poster() {
        return new PosterServiceImpl();
    }

}
